package com.example.demo.service.imp;
import java.util.ArrayList;
import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.demo.mapper.MovieMapper;
import com.example.demo.pojo.Cinema;
import com.example.demo.service.MovieService;
import com.woniuxy.movice.entity.Movie;
import com.example.demo.service.MovieService;
import com.woniuxy.movice.entity.MovieHall;
import com.example.demo.pojo.Round;
import com.example.demo.pojo.Round2;

@Transactional
@Service
public class MovieServiceImp implements MovieService{
	@Resource
	MovieMapper movieMapper;
	
	@Override
	public ArrayList<Cinema> allCinema() {
		return movieMapper.allCinema();
	}

	public MovieMapper getMovieMapper() {
		return movieMapper;
	}

	public void setMovieMapper(MovieMapper movieMapper) {
		this.movieMapper = movieMapper;
	}

	@Override
	public int addHall(MovieHall hall) {
		return movieMapper.addHall(hall);
	}
	@Override
	public int sameName(MovieHall hall) {
		return movieMapper.sameName(hall);
	}

	@Override
	public void addMovie(Movie movie) {
		movieMapper.addMovie(movie);
	}
	@Override
	public ArrayList<MovieHall> allHall(int yid) {
		return movieMapper.allHall(yid);
	}
	@Override
	public ArrayList<com.example.demo.pojo.Movie> allMovie() {
		return movieMapper.allMovie();
	}
	@Override
	public ArrayList<Round> showArranges(String vstart, int yid, int ytid) {
		return movieMapper.showArranges(vstart, yid, ytid);
	}

	public String findLayout(Integer ytid) {
		return movieMapper.findLayout(ytid);
	}

	public int interTime(Date pstart, Date pend) {
		return movieMapper.interTime(pstart, pend);
	}

	public void addArrange(Round2 round) {
		movieMapper.addArrange(round);
	}

	public int findOrderCount(int id) {
		return movieMapper.findOrderCount(id);
	}

	public void deleArrange(int id) {
		movieMapper.deleArrange(id);
	}

	@Override
	public int roundByYt(int ytid) {
		return movieMapper.roundByYt(ytid);
	}

	@Override
	public void deleHall(int ytid) {
		movieMapper.deleHall(ytid);
	}

}
